package com.trs.publish.domain;

import java.util.Date;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

import org.hibernate.validator.constraints.NotEmpty;

public class Power extends BasicJavaBean{
    private Long id;

    @NotEmpty(message="权限编码不能为空")
    @Pattern(regexp="^ROLE_\\w+$", message="权限编码格式错误")
    private String powername;
    
    @NotEmpty(message="权限URL不能为空")
    private String powerurl;
    
    @NotEmpty(message="权限描述不能为空")
    private String memo;
    
    @NotEmpty(message="权限优先级不能为空")
    @Pattern(regexp="^[1-9]\\d*$", message="权限优先级必须是数字类型且大于0")
    private String rank;

    private Date createtime;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getPowername() {
		return powername;
	}

	public void setPowername(String powername) {
		this.powername = powername;
	}

	public String getPowerurl() {
		return powerurl;
	}

	public void setPowerurl(String powerurl) {
		this.powerurl = powerurl;
	}

	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

	

	public String getRank() {
		return rank;
	}

	public void setRank(String rank) {
		this.rank = rank;
	}

	public Date getCreatetime() {
		return createtime;
	}

	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}
    
    
}